package com.xiaoning.sun.spring.mvc.validator;

import org.springframework.validation.Errors;
import org.springframework.validation.Validator;

import com.xiaoning.sun.spring.mvc.model.RegisterForm;
import com.xiaoning.sun.spring.mvc.utils.FieldValidator;

public class RegisterValidatior implements Validator{

	@Override
	public boolean supports(Class<?> clazz) {
		return RegisterForm.class.isAssignableFrom(clazz);
	}
	@Override
	public void validate(Object object, Errors errors) {
		FieldValidator.validator(object, errors);
	}
}
